﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Home.Domain.Entities
{
    /// <summary>
    /// 品牌
    /// </summary>
    public class Brand
    {
        /// <summary>
        /// 品牌Id
        /// </summary>
        [DisplayName("品牌Id")]
        public int? Id { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [DisplayName("品牌名称")]
        [StringLength(50, ErrorMessage = "长度不能超过10个字符")]
        [Required(ErrorMessage = "名称不能为空")]
        public string Name { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [DisplayName("排序")]
        public int? Sort { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 分类品牌关系表
        /// </summary>
        public virtual ICollection<Category_Brand> Category_Brands { get; set; } 
         
    }
}
